﻿using Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DAL
{
    public class FangPrice_DAL
    {
        public FangPrice_DAL(Context context)
        {
            Context = context;
        }

        public Context Context { get; }
        /// <summary>
        /// 房价添加
        /// </summary>
        /// <param name="m"></param>
        /// <returns></returns>
        public int Add(FangPrice_Model m)
        {
            Context.FangPrice_Model.Add(m);
            return Context.SaveChanges();
        }
        /// <summary>
        /// 房价列表s
        /// </summary>
        /// <returns></returns>
        public List<FangPrice_Model> Show()
        {
            return Context.FangPrice_Model.AsQueryable().ToList();
        }
    }
}
